package cn.edu.wtbu.wtbu_music_server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 
 * @TableName music
 */
@Schema(description = "歌曲对象")
@TableName(value ="music")
@Data
public class Music implements Serializable {
    /**
     * 歌曲id
     */
    @Schema(description = "歌曲id",example = "1")
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 歌曲名
     */
    @Schema(description = "歌曲名",example = "七里香")
    private String name;

    /**
     * 播放地址
     */
    @Schema(description = "播放地址",example = "http://localhost:8080/music/1.mp3")
    private String url;

    /**
     * 歌曲风格流派，例如：pop
     */
    @Schema(description = "歌曲风格流派，例如：pop",example = "流行")
    private String style;

    /**
     * 歌词
     */
    @Schema(description = "歌词",example = "七里香")
    private String lrc;

    /**
     * 持续时长(毫秒)
     */
    @Schema(description = "持续时长(毫秒)",example = "361000")
    private Integer duration;

    /**
     * 文件大小(字节)
     */
    @Schema(description = "文件大小(字节)",example = "231234")
    private Integer size;

    /**
     * 歌曲状态：0-正常 1-下架
     */
    @Schema(description = "歌曲状态：0-正常 1-下架",example = "0",allowableValues = "0,1")
    private Integer status;

    /**
     * 专辑id
     */
    @Schema(description = "专辑id",example = "1")
    private Integer aid;

    /**
     * 专辑对象
     */
    @Schema(description = "专辑对象")
    @TableField(exist = false)   //非数据表中的字段，不会被映射到数据库中
    private Album album;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}